package com.ruoyi.supplier.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.supplier.mapper.TbBankProjectMapper;
import com.ruoyi.supplier.domain.TbBankProject;
import com.ruoyi.supplier.service.ITbBankProjectService;

/**
 * 项目Service业务层处理
 * 
 * @author oliver.li
 * @date 2021-08-14
 */
@Service
public class TbBankProjectServiceImpl implements ITbBankProjectService 
{
    @Autowired
    private TbBankProjectMapper tbBankProjectMapper;

    /**
     * 查询项目
     * 
     * @param id 项目ID
     * @return 项目
     */
    @Override
    public TbBankProject selectTbBankProjectById(Long id)
    {
        return tbBankProjectMapper.selectTbBankProjectById(id);
    }

    /**
     * 查询项目列表
     * 
     * @param tbBankProject 项目
     * @return 项目
     */
    @Override
    public List<TbBankProject> selectTbBankProjectList(TbBankProject tbBankProject)
    {
        return tbBankProjectMapper.selectTbBankProjectList(tbBankProject);
    }

    /**
     * 新增项目
     * 
     * @param tbBankProject 项目
     * @return 结果
     */
    @Override
    public int insertTbBankProject(TbBankProject tbBankProject)
    {
        tbBankProject.setCreateTime(DateUtils.getNowDate());
        return tbBankProjectMapper.insertTbBankProject(tbBankProject);
    }

    /**
     * 修改项目
     * 
     * @param tbBankProject 项目
     * @return 结果
     */
    @Override
    public int updateTbBankProject(TbBankProject tbBankProject)
    {
        tbBankProject.setUpdateTime(DateUtils.getNowDate());
        return tbBankProjectMapper.updateTbBankProject(tbBankProject);
    }

    /**
     * 批量删除项目
     * 
     * @param ids 需要删除的项目ID
     * @return 结果
     */
    @Override
    public int deleteTbBankProjectByIds(Long[] ids)
    {
        return tbBankProjectMapper.deleteTbBankProjectByIds(ids);
    }

    /**
     * 删除项目信息
     * 
     * @param id 项目ID
     * @return 结果
     */
    @Override
    public int deleteTbBankProjectById(Long id)
    {
        return tbBankProjectMapper.deleteTbBankProjectById(id);
    }
}
